<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/common_tag.jsp"%>
<script type="text/javascript">
$(function(){
	initEasyUIStyle();
})
function btn_save (){
	var flag = $('#stuInfoForm').form('validate');
	if(flag){
		$.ajax({
   			url: "student_addStudent.do",
   			type: "post",
   			data: $("#stuInfoForm").serialize(),
   			datatype:"json",
   			success: function(data){
		    	if(data.MSG=="success"){
		    		$.messager.alert('提示','数据已保存!');
   			    }else{
   			    	$.messager.alert('提示','数据保存失败!','error');
	   			}
		  	}
		});
   	}
}
</script>
 <div class="pageContent">
	<form method="post" action="student!addStudent.do" >
	<div class="pageForm">
				<s:token />
	<div class="pageFormContent" layoutH="56">	
			<dl>
				<dt>儿童姓名：</dt>
				<dd><input name="stu.name" type="text"  class="easyui-validatebox" required="true"   /></dd>
			</dl>
			<dl>
				<dt>性别：</dt>
				<dd>
					<select class="easyui-validatebox" name="stu.sex" required="true"  >
						<option value="1">男</option>
						<option value="0">女</option>
					</select>
				</dd>
			</dl>
			<dl><dt></dt><dd></dd></dl>
			<dl>
				<dt>出生日期：</dt>
				<dd>
					<input type="text"  class="easyui-datebox"  name="stu.birthday" />
				</dd>
			</dl>
			
			<dl>
				<dt>年龄：</dt>
				<dd><input name="gua.age" type="text" class="easyui-validatebox" required="true"  /></dd>
			</dl>
			<dl><dt></dt><dd></dd></dl>
			<dl>
				<dt>预计入园日期：</dt>
				<dd>
					<input type="text" name="stu.inDate" class="easyui-datebox"/>
				</dd>
			</dl>
			<dl>
				<dt>类型：</dt>
				<dd>
					<select class="easyui-validatebox" name="stu.studentType" >
						<option value="1">咨询</option>
						<option value="2">意向报名</option>
					</select>
				</dd>
			</dl>
				<dl><dt></dt><dd></dd></dl>
			<dl>
				<dt>地址：</dt>
				<dd>
					<input type="text" name="stu.address" class="easyui-validatebox" />
				</dd>
			</dl>
				
			<dl>
				<dt>联系人：</dt>
				<dd><input name="gua.name" type="text" class="easyui-validatebox" required="true" /></dd>
			</dl>
			<dl><dt></dt><dd></dd></dl>
			<dl>
				<dt>联系电话：</dt>
				<dd>
					<input type="text" name="stu.fphone" class="easyui-validatebox" required="true"/>
				</dd>
			</dl>
			
			<dl>
				<dt>咨询方式：</dt>
				<dd>
					<select class="easyui-validatebox" name="stu.studentType" >
						<option value="1">来电</option>
						<option value="2">来访</option>
						<option value="3">网络</option>
					</select>
				</dd>
			</dl>
			<dl><dt></dt><dd></dd></dl>
			<dl>
				<dt>备注信息：</dt>
				<textarea name="personThreadContact.content" class="easyui-validatebox"   rows="8" cols="65" ></textarea>
			</dl>
			
		</div>
		<div class="formBar">
			<ul>
				<li>
					<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save"
						id="btn_save" onclick="btn_save()">提交</a>
						
				</li>
				<li>
					<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
						id="btn_cancel">取消</a>
				</li>
			</ul>
		</div>
		</div>
	</form>
		
</div>
